package com.tydic.baselibrary.contant;

import android.Manifest;
import android.os.Environment;
import androidx.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;


/**
 * @author： ljb
 * @date： 2018/02/05
 */
public class Constant {
    /**
     * 应用下载存储路径
     */
    public static String filePath = Environment.getExternalStorageDirectory()+"/hhljy/hhljy.apk";
    /**
     * 权限常量相关
     */
    public static final int WRITE_READ_EXTERNAL_CODE = 0x01;
    public static final String[] WRITE_READ_EXTERNAL_PERMISSION = new String[]{
            Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE};
    public static final int CAMERA_CODE = 0x02;
    public static final String[] CAMERA_PERMISSION = new String[]{Manifest.permission.CAMERA};
    public static final int CALENDAR_CODE = 0X03;
    public static final String[] CALENDAR_PERMISSION = new String[]{Manifest.permission.READ_CALENDAR, Manifest.permission.WRITE_CALENDAR};
    /**
     * AndroidO 8.0升级安装所需权限
     */
    public static final int INSTALL_APK_CODE = 0x04;
    public static final String[] INSTALL_APK_PERMISSION = new String[]{Manifest.permission.REQUEST_INSTALL_PACKAGES};


    // 告诉编译器不要在.class文件中存储注解数据
    @Retention(RetentionPolicy.SOURCE)
    @IntDef({WRITE_READ_EXTERNAL_CODE, CAMERA_CODE, CALENDAR_CODE, INSTALL_APK_CODE})
    public @interface PermissionManage {
    }
}
